package com.fwj.authorization.staff.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fwj.base.dto.BaseDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;

/**
 * 用户实体
 *
 * @author 樊温军
 * @date 2025/3/18 上午10:32
 */
@EqualsAndHashCode(callSuper = true)
@Data
@ApiModel(description = "用户")
public class SysUser extends BaseDTO {

    /**
     * 主键ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty(value = "主键ID")
    private Long id;

    /**
     * 账号
     */
    @NotBlank(message = "账号不能为空")
    @ApiModelProperty(value = "账号")
    private String username;

    /**
     * 头像
     */
    @ApiModelProperty(value = "头像")
    private String avatar;

    /**
     * 真实名
     */
    @NotBlank(message = "真实名不能为空")
    @ApiModelProperty(value = "真实名")
    private String realName;

    /**
     * 状态
     */
    @ApiModelProperty(value = "状态")
    private String status;

    /**
     * 密码
     */
    @ApiModelProperty(value = "密码")
    private String pwd;

    /**
     * 类型
     */
    @ApiModelProperty(value = "类型")
    private String type;

    /**
     * 用户扩展字段
     */
    @ApiModelProperty(value = "用户扩展字段")
    @TableField(exist = false)
    private SysUserExpand sysUserExpand;

    /**
     * 确认密码
     */
    @ApiModelProperty(value = "确认密码")
    @TableField(exist = false)
    private String confirmPwd;

}
